package com.naiterui.ehp.bs.b2c.order.fegin;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.naiterui.ehp.bp.bo.recommend.MedicationRecomBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomDetailBO;
import com.naiterui.ehp.bp.bo.recommend.PrescriptionPlatformRecomInfoBO;
import com.naiterui.ehp.bp.bo.recommend.RecomOrderInfoBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;

@FeignClient(name = "b2cTuijian", url = "${ehp.domain.tuijian}", configuration = FeignConfiguration.class)
public interface IRecommendFeignClient {

    @PostMapping("inner/recom/order/update/new")
    void updateOrderRecom(@RequestBody RecomOrderInfoBO orderInfo) throws BusinessException;

    /**
     * 订单妥投通知
     */
    @PostMapping("/inner/assist/order/complete")
    void orderCompleteNotify(@RequestParam("orderId") Long orderId, @RequestParam("orderSN") String orderSN,
                             @RequestParam("recomIds") String recomIds) throws BusinessException;

    @PostMapping("inner/recomdetail/list/get")
    List<MedicationRecomDetailBO> getRecomDetailList(@RequestParam("recomIds") String recomIds) throws BusinessException;

    @GetMapping("inner/platform/recom/info")
    PrescriptionPlatformRecomInfoBO getPlatformRecomInfo(@RequestParam("recomId") Long recomId);

    @RequestMapping("inner/recom/get")
    MedicationRecomBO getRecom(@RequestParam("recomId") Long recomId) throws BusinessException;

    /**
     * 获取是否开启用药提醒
     * 
     * @param recomId
     * @return
     */
    @GetMapping("/inner/assist/getEnabledDrugremind")
    Boolean getEnabledDrugremind(@RequestParam("recomId") Long recomId);
}
